# Contributor: Seung Soo Mun <hamletmun@gmail.com>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=ruby-mini_portile2
_gemname=${pkgname#ruby-}
pkgver=2.8.0
pkgrel=1
pkgdesc="Simplistic port-like solution for developers"
url="https://github.com/flavorjones/mini_portile"
arch="noarch"
license="MIT"
depends="ruby"
source="https://rubygems.org/downloads/$_gemname-$pkgver.gem"
options="!check"  # FIXME

package() {
	local gemdir="$pkgdir/$(ruby -e 'puts Gem.default_dir')"
	local geminstdir="$gemdir/gems/$_gemname-$pkgver"

	gem install \
		--local \
		--install-dir "$gemdir" \
		--ignore-dependencies \
		--no-document \
		--verbose \
		"$srcdir"/$_gemname-$pkgver.gem

	rm -rf "$gemdir"/cache \
		"$geminstdir"/.github \
		"$geminstdir"/test \
		"$geminstdir"/*.md \
		"$geminstdir"/*.txt \
		"$geminstdir"/*.yml \
		"$geminstdir"/Rakefile
}

sha512sums="
74eb55b15329d31b65d363ce2fda26b849d708bf77481acdf851bdf6c97a8c3f9676d5bebf46e9e3eeb55e0e243c8e995eda6952f51f54b846762ab0f65aa7df  mini_portile2-2.8.0.gem
"
